package com.domino.server.user;

import java.net.URL;
import java.net.URLConnection;
import java.util.Scanner;

public class WebContentUtil {

	private static final String END_OF_INPUT = "\\Z";

	public static String getPageContent(String url) {
	    String result = null;
	    URLConnection connection = null;
	    
		try {
		  URL fURL = new URL(url);
	      connection =  fURL .openConnection();
	      Scanner scanner = new Scanner(connection.getInputStream());
	      scanner.useDelimiter(END_OF_INPUT);
	      result = scanner.next();
	    }
	    catch ( Exception ex ) {
	      return null;
	    }
	    return result;
	  }

}
